package demo.using;

import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.Scanner;

/**
 * @author : GuoFei
 * @date : 2018/12/4 14:26
 */
public class testJSON {


//    public static void main(String[] args) {
//        MyJSONObject test1 = new MyJSONObject<>().put("tt", "dd").put("nnn","ddd");
//        JSONArray arr = new MyJSONArray().append(test1).append(test1).append(23);
//        System.out.println(arr);
//    }


    public static void main(String[] args) throws InterruptedException {
        Scanner scanner = new Scanner(System.in);
        System.out.println("begin");
        String i = "1";
        Map<Integer, String> month = new HashMap<>();
        month.put(1, "January");
        month.put(2, "February");
        month.put(3, "March");
        month.put(4, "April");
        month.put(5, "May");
        month.put(6, "June");
        month.put(7, "July");
        month.put(8, "August");
        month.put(9, "September");
        month.put(10, "October");
        month.put(11, "November");
        month.put(12, "December");
        while (!i.equals("0")) {
            int r = new Random().nextInt(12) + 1;
            System.out.println(r);
            Thread.sleep(3000);
            System.out.println(month.get(r));
            i = scanner.next();
        }
        System.out.println("end");
    }

//    public static void main(String[] args) throws IOException {
//            String dir = "C:\\Users\\mayn\\Desktop\\auto_java\\result\\";
//            String name = System.currentTimeMillis()+".txt";
//            File file = new File(dir + name);
//            if (!file.exists()) {
//                new File(file.getParent()).mkdirs();
//                file.createNewFile();
//            }
//    }

}
